package com.shisfish.library.Impl;

import java.util.List;
import java.util.Map;

import org.springframework.context.ApplicationContext;

import com.shisfish.library.Inter.IBookInter;
import com.shisfish.library.Model.Book;
import com.shisfish.library.Utils.Global.GetACXmlUtils;

public class BookImpl implements IBookInter {

	private ApplicationContext ac = GetACXmlUtils.getACXml();
	IBookInter mapper = (IBookInter) ac.getBean("bookMapper");
	
	@Override
	public int insertOne(Book t) {
		// TODO Auto-generated method stub
		return mapper.insertOne(t);
	}

	@Override
	public int insertAll(List<Book> list) {
		// TODO Auto-generated method stub
		return mapper.insertAll(list);
	}

	@Override
	public int updateOne(Book t) {
		// TODO Auto-generated method stub
		return mapper.updateOne(t);
	}

	@Override
	public int updateAll(List<Book> list) {
		// TODO Auto-generated method stub
		return mapper.updateAll(list);
	}

	@Override
	public List<Book> selectById(int id) {
		// TODO Auto-generated method stub
		return mapper.selectById(id);
	}

	@Override
	public List<Book> selectByKey(String key) {
		// TODO Auto-generated method stub
		return mapper.selectByKey(key);
	}

	@Override
	public List<Book> selectAll() {
		// TODO Auto-generated method stub
		return mapper.selectAll();
	}

	@Override
	public int deleteOneById(int id) {
		// TODO Auto-generated method stub
		return mapper.deleteOneById(id);
	}

	@Override
	public int deleteAllById(List<?> ids) {
		// TODO Auto-generated method stub
		return mapper.deleteAllById(ids);
	}

	@Override
	public int deleteOneByKey(String key) {
		// TODO Auto-generated method stub
		return mapper.deleteOneByKey(key);
	}

	@Override
	public int deleteAllByKey(List<?> keys) {
		// TODO Auto-generated method stub
		return mapper.deleteAllByKey(keys);
	}

	@Override
	public List<Book> selectByCategory(String category, int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByCategory(category, currentPage, pageSize);
	}

	@Override
	public int countByCategory(String category) {
		// TODO Auto-generated method stub
		return mapper.countByCategory(category);
	}

	@Override
	public List<Book> selectByTitle(String title, int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByTitle(title, currentPage, pageSize);
	}

	@Override
	public List<Book> selectByAuthor(String author, int currentPage,
			int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByAuthor(author, currentPage, pageSize);
	}

	@Override
	public List<Book> selectByISBN(String ISBN) {
		// TODO Auto-generated method stub
		return mapper.selectByISBN(ISBN);
	}

	@Override
	public List<Book> selectByPage(int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByPage(currentPage, pageSize);
	}

	@Override
	public int countAll() {
		// TODO Auto-generated method stub
		return mapper.countAll();
	}

	@Override
	public int countByTitle(String title) {
		// TODO Auto-generated method stub
		return mapper.countByTitle(title);
	}

	@Override
	public int countByAuthor(String author) {
		// TODO Auto-generated method stub
		return mapper.countByAuthor(author);
	}

	@Override
	public int countByISBN(String ISBN) {
		// TODO Auto-generated method stub
		return mapper.countByISBN(ISBN);
	}

	@Override
	public int countFuzzy(List<String> singleString) {
		// TODO Auto-generated method stub
		return mapper.countFuzzy(singleString);
	}

	@Override
	public List<Book> selectFuzzy(List<String> singleString, int currentPage,
			int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectFuzzy(singleString, currentPage, pageSize);
	}

	@Override
	public List<Map<String, Object>> selectOtherBooks(int number) {
		// TODO Auto-generated method stub
		return mapper.selectOtherBooks(number);
	}

	@Override
	public List<Map<String, Object>> selectFuzzyLess(List<String> singleString,
			int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectFuzzyLess(singleString, currentPage, pageSize);
	}

	@Override
	public List<Book> selectByISBN1(String ISBN, int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByISBN1(ISBN, currentPage, pageSize);
	}

	@Override
	public List<Book> selectAllPage(int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectAllPage(currentPage, pageSize);
	}

	@Override
	public int countJournal(List<String> singleString) {
		// TODO Auto-generated method stub
		return mapper.countJournal(singleString);
	}

	@Override
	public List<Book> selectJournal(List<String> singleString, int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectJournal(singleString, currentPage, pageSize);
	}

	@Override
	public Book selectJournalDetail(String ISBN) {
		// TODO Auto-generated method stub
		return mapper.selectJournalDetail(ISBN);
	}

	@Override
	public List<Book> selectISBNJ(String isbn) {
		// TODO Auto-generated method stub
		return mapper.selectISBNJ(isbn);
	}

	@Override
	public int countISBNJ(String isbn) {
		// TODO Auto-generated method stub
		return mapper.countISBNJ(isbn);
	}

	@Override
	public int countByISSN(String ISSN) {
		// TODO Auto-generated method stub
		return mapper.countByISSN(ISSN);
	}

	@Override
	public List<Book> selectByISSN(String ISSN, int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByISSN(ISSN, currentPage, pageSize);
	}

	@Override
	public int countByCategoryJ(String category) {
		// TODO Auto-generated method stub
		return mapper.countByCategoryJ(category);
	}

	@Override
	public List<Book> selectByCategoryJ(String category, int currentPage,
			int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByCategoryJ(category, currentPage, pageSize);
	}

	@Override
	public int countByTitleJ(String title) {
		// TODO Auto-generated method stub
		return mapper.countByTitleJ(title);
	}

	@Override
	public List<Book> selectByTitleJ(String title, int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByTitleJ(title, currentPage, pageSize);
	}

	@Override
	public int countByAuthorJ(String author) {
		// TODO Auto-generated method stub
		return mapper.countByAuthorJ(author);
	}

	@Override
	public List<Book> selectByAuthorJ(String author, int currentPage,
			int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByAuthorJ(author, currentPage, pageSize);
	}

	@Override
	public int countByISBNJ(String ISBN) {
		// TODO Auto-generated method stub
		return mapper.countByISBNJ(ISBN);
	}

	@Override
	public List<Book> selectByISBN1J(String ISBN, int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByISBN1J(ISBN, currentPage, pageSize);
	}

	@Override
	public int countFuzzyJ(List<String> singleString) {
		// TODO Auto-generated method stub
		return mapper.countFuzzyJ(singleString);
	}

	@Override
	public List<Book> selectFuzzyJ(List<String> singleString, int currentPage,
			int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectFuzzyJ(singleString, currentPage, pageSize);
	}

	@Override
	public List<Map<String, Object>> selectFuzzyLessJ(
			List<String> singleString, int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectFuzzyLessJ(singleString, currentPage, pageSize);
	}

	@Override
	public List<Book> selectByISBNJ(String ISBN) {
		// TODO Auto-generated method stub
		return mapper.selectByISBNJ(ISBN);
	}

	@Override
	public int countAllJ() {
		// TODO Auto-generated method stub
		return mapper.countAllJ();
	}

	@Override
	public List<Book> selectAllPageJ(int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectAllPageJ(currentPage, pageSize);
	}

	@Override
	public int countByCategoryT(String category) {
		// TODO Auto-generated method stub
		return mapper.countByCategoryT(category);
	}

	@Override
	public int countByCategoryTJ(String category) {
		// TODO Auto-generated method stub
		return mapper.countByCategoryTJ(category);
	}

	public int countNewAdd(int type) {
		// TODO Auto-generated method stub
		return mapper.countNewAdd(type);
	}

	public List<Book> selectNewAddPage(int type, int beginIndex, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectNewAddPage(type, beginIndex, pageSize);
	}
	
	public int countNewAddJ(int type) {
		// TODO Auto-generated method stub
		return mapper.countNewAdd(type);
	}

	public List<Book> selectNewAddPageJ(int type, int beginIndex, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectNewAddPage(type, beginIndex, pageSize);
	}
	
	@Override
	public List<Book> selectByPublisher(String publisher, int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByPublisher(publisher, currentPage, pageSize);
	}

	@Override
	public int countByPublisher(String publisher) {
		// TODO Auto-generated method stub
		return mapper.countByPublisher(publisher);
	}
	
	@Override
	public List<Book> selectByPublisherJ(String publisher, int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByPublisherJ(publisher, currentPage, pageSize);
	}

	@Override
	public int countByPublisherJ(String publisher) {
		// TODO Auto-generated method stub
		return mapper.countByPublisherJ(publisher);
	}

	public int countByCategoryTJYear(String category, String pubdate) {
		// TODO Auto-generated method stub
		return mapper.countByCategoryTJYear(category, pubdate);
	}

	public int countByISBNJYear(String isbn, String pubdate) {
		// TODO Auto-generated method stub
		return mapper.countByISBNJYear(isbn, pubdate);
	}

}
